
#include <ctime>
#include <iostream>
#include <array>
#include <vector>
#include <map>
#include <functional>

using namespace std;

template<typename T>
class Makefinal {
    friend T;

private:
    Makefinal() {}

    ~Makefinal() {}
};

class FinalClass2 : virtual public Makefinal<FinalClass2> {
public:
    FinalClass2() {}

    ~FinalClass2() {}

    void func1() {
        std::cout << __func__ << std::endl;
    }

    int func1(int a) {
        std::cout << __func__ << "\t" << a << std::endl;
        return ++a;
    }
};

int main(int argc, char const *argv[]) {
    //array<int,3> v1{ 1,2,3 };
    //array<int,3> v2(v1);

    //v1 = v2;
    //auto addr = std::addressof(v1);
    //auto reference = std::ref(v1);

    struct timespec time1 = {0, 0};
    struct timespec time2 = {0, 0};

    // clock_gettime(CLOCK_REALTIME, &time1);
    FinalClass2 fc;

    void (FinalClass2::* func1)(void) = &FinalClass2::func1;
    int (FinalClass2::* func2)(int) = &FinalClass2::func1;
    auto foo1 = std::mem_fn(func1);
    auto foo2 = std::mem_fn(func2);
    foo1(fc);
    std::cout << foo2(fc, 10) << std::endl;
    return 0;
}
